<?php
/* @var $this HistJurnalController */
/* @var $model HistJurnal */
/* @var $form TbActiveForm */
?>

<div class="form">

    <?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'hist-jurnal-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

    <p class="help-block">Fields with <span class="required">*</span> are required.</p>

    <?php echo $form->errorSummary($model); ?>
	   <?php echo $form->textFieldControlGroup($model,'trx_date',array('span'=>5,'class'=>'form-control input-width-small','data-mask'=>"99-99-9999",'value'=>date('d-m-Y'))); ?>
	<table class="table table-hover table-striped table-bordered table-highlight-head" id="tbl_neraca">
	<thead>
		<th style="text-align:center">No.</th>
		<th style="text-align:center">Account Code</th>
		<th style="text-align:center">Description</th>
		<th style="text-align:center">Debet</th>
		<th style="text-align:center">Credit</th>
	</thead>
	<tbody>
		<?php  for ($i=0;$i<10;$i++){ ?>
		<tr>
			<td><?=$i+1?></td>
			<td>
				<?php echo $form->dropDownList($model,'mst_account_id',CHtml::listData(MstCoa::model()->findAll(), 'id','name'), array('empty'=>'--Pilih COA--','class'=>'form-control','name'=>'account_code[]','options' => array($data[$i]['mst_account_id']=>array('selected'=>true)))); ?>
			</td>
			<td>
				  <?php echo $form->textArea($model,'description',array('span'=>5,'maxlength'=>100,'class'=>'form-control','name'=>'desc[]','value'=>$data[$i]['description'])); ?>
			</td>
			<td>
				 <?php echo $form->textField($model,'debet',array('span'=>5,'class'=>'form-control','name'=>'debet[]','value'=>$data[$i]['debet'])); ?>
			</td>
			<td>
				 <?php echo $form->textField($model,'credit',array('span'=>5,'class'=>'form-control','name'=>'credit[]','value'=>$data[$i]['credit'])); ?>
			</td>
		</tr>
		<?php } ?>
	</tbody>
	</table>
          

          



    <?php $this->endWidget(); ?>

</div><!-- form -->